<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml">

	<ui:define name="body">

		<h:messages globalOnly="true" styleClass="message" />
		<style type="text/css">
.ecol1 {
	vertical-align: top;
	padding-right: 25px
}

.ecol2 {
	vertical-align: top;
	border-left: #ACBECE 1px solid;
	padding-left: 10px
}

.rich-calendar-tool-btn {
	font-family: Arial, Verdana;
}
</style>


		<h:form id="cartaoForm">

			<rich:panel>
				<f:facet name="header">Cartao</f:facet>

				<s:decorate id="clienteDecoration" template="layout/edit.xhtml">
					<ui:define name="label">Cliente</ui:define>
					<h:outputText value="clienteId" id="cliente" />
				</s:decorate>

				<s:decorate id="numeroDecoration" template="layout/edit.xhtml">
					<ui:define name="label">Numero</ui:define>
					<h:inputText id="numero" required="true"
						value="#{cartaoHome.instance.numero}" />
				</s:decorate>

				<s:decorate id="digVerificacaoDecoration"
					template="layout/edit.xhtml">
					<ui:define name="label">Digito de Verificacao</ui:define>
					<h:inputText id="digVerificacao" required="true" maxlength="3"
						size="3" value="#{cartaoHome.instance.digVerificacao}">
						<f:validateLength minimum="3" />
					</h:inputText>
				</s:decorate>
				<s:decorate id="dataVencimentoDecoration"
					template="layout/edit.xhtml">
					<ui:define name="label">Data de Vencimento</ui:define>
					<a4j:outputPanel id="calendar" layout="block">
						<rich:calendar value="#{cartaoHome.instance.dataVencimento}"
							required="true" popup="true" datePattern="MM/yyy"
							showApplyButton="false" cellWidth="24px" cellHeight="22px"
							style="width:200px" />
					</a4j:outputPanel>

				</s:decorate>

				<div style="clear: both" />

			</rich:panel>

			<div class="actionButtons"><h:commandButton id="save"
				value="Salvar" action="#{cartaoHome.persist}"
				rendered="#{!cartaoHome.managed}" /> <h:commandButton id="update"
				value="Atualizar" action="#{cartaoHome.update}"
				rendered="#{cartaoHome.managed}" /> <h:commandButton id="delete"
				value="Excluir" action="#{cartaoHome.remove}" immediate="true"
				rendered="#{cartaoHome.managed}" /> <s:button propagation="end"
				id="done" value="Voltar" view="/cartaoList.xhtml" /></div>

		</h:form>

	</ui:define>

</ui:composition>

